home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / p4 / p4-1_2c.lha / p4-1.2c / messages / grid_comm.c next >
Text File  |  1993-05-24  |  613b  |  37 lines

  1. #define BOOL            int
  2. #define TRUE            1
  3. #define FALSE           0
  4.  
  5. #define ROWS         100
  6. #define COLUMNS         100
  7. #define ROWS_PER_SUB     50
  8. #define COLUMNS_PER_SUB  50
  9.  
  10. #define PROCS_PER_COL    (ROWS / ROWS_PER_SUB)
  11. #define PROCS_PER_ROW    (COLUMNS / COLUMNS_PER_SUB)
  12. #define N_PROCS        (PROCS_PER_ROW * PROCS_PER_COL)
  13.  
  14. upper_bound(row)
  15. int row;
  16. {
  17.     return((row == 1));
  18. }
  19.  
  20. lower_bound(row)
  21. int row;
  22. {
  23.     return((row == (ROWS - ROWS_PER_SUB + 1)));
  24. }
  25.  
  26. right_bound(column)
  27. int column;
  28. {
  29.     return((column == (COLUMNS - COLUMNS_PER_SUB + 1)));
  30. }
  31.  
  32. left_bound(column)
  33. int column;
  34. {
  35.     return((column == 1));
  36. }
  37.